//定时器--开始
var timerStart=function(){
	var curCount=this.count++;
	$('timerDisplay').set('text',curCount);
	$('timerBar').setStyle('width',curCount);
}
//定时器--结束

window.addEvent('domready',function(){
	//定时器
	var hashCount=new Hash({count:0});
	var simpleTimer=timerStart.periodical(100,hashCount);
	$clear(simpleTimer);
	$('timerStart').addEvent('click',function(){
		simpleTimer=timerStart.periodical(100,hashCount);
	});
	$('timerPause').addEvent('click',function(){
		$clear(simpleTimer);
		$('timerBar').highlight('#58ff69');
	});
	$('timerReset').addEvent('click',function(){
		$clear(simpleTimer);
		hashCount.set('count',0);
		$('timerDisplay').set('text',0);
		$('timerBar').setStyle('width',0);
	});
});